package com.linkoog.devtools.toolwindow_manager;

import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.project.Project;

/**
 */
public class ToolWindowManagerActionGroup extends DefaultActionGroup {
    @Override
    public void update(AnActionEvent e) {
        final Project project = e.getDataContext().getData(CommonDataKeys.PROJECT);
        if (project == null || project.isDefault()) {
            e.getPresentation().setVisible(false);
        } else {
            e.getPresentation().setVisible(true);
        }
    }
}
